﻿using System;
using System.IO;
using System.Configuration;

namespace SBPweb.Forge.Logger.Writers
{

    public class FileLogWriter : LogWriter
    {

        #region Private fields

        #endregion

        #region Constructor logic

        public FileLogWriter(Stream stream)
            : base(stream)
        {
        }

        public FileLogWriter(KeyValueConfigurationCollection settings)
            : base(new FileLogWriterStreamFactory().InstantiateStreamBasedOnSettings(settings))
        {
            if (settings["autoFlush"] != null)
            {
                this.AutoFlush = Convert.ToBoolean(settings["autoFlush"].Value);
            }
        }

        #endregion

        #region Methods

        #endregion

    }

}